#include "DataManagerProxy.h"

DataManagerProxy::DataManagerProxy() {

}

DataManagerInfo DataManagerProxy::loadModuleInfos(int id, std::string app)
{
/*
    DataItem objDataItem;
    objDataItem.Id = 1;
    objDataItem.Code = "CEJINGYI-001.TEMP";
    objDataItem.DataName = "1号测径仪温度";
    objDataItem.DataType = "Integer";
    objDataItem.Description = "1号测径仪温度值";
    objDataItem.Displayed = true;

    ModuleInfo objModule;
    objModule.Id = 1;
    objModule.Name = "Modbus000";
    objModule.Model = "Modbus Com A0001";
    objModule.Code = "Modbus000-1";
    objModule.Type = ModuleType::Sensor;
    objModule.AssemblyName = "plugins/SampleTemperature.dll";
    objModule.ClassName = "Lanpeng.Module.Sensors.Modbus001";
    objModule.Version = "1.0";

    DeviceInfo objDevice;
    objDevice.Id = 1;
    objDevice.Name = "测径仪温度传感器";
    objDevice.Type = "传感器";
    objDevice.Model = "Temperatur Sensor A001";
    objDevice.Code = "ASCDSC001221S";
    objDevice.Description = "aaaaa";
    objDevice.ModuleInfo = objModule;
    objDevice.Properties.push_back(objDataItem);
*/
    ModuleInfo mi;
    mi.Name = "RedisSubscriber";

    mi.AssemblyName = "plugins/RedisSubscriber.dll";
    mi.ClassName = "RedisSubscriber";
    ConsumerInfo ci;

    ci.name = "TDengine";

    ci.AssemblyName = "plugins/TDengine.dll";
    ci.ClassName = "TDengine";
    ci.SubscribeName = "RedisSubscriber";

    DataManagerInfo listDataManageInfo;
    listDataManageInfo.consumers.push_back(ci);
    listDataManageInfo.modules.push_back(mi);

    return listDataManageInfo;
}
